<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>店铺商品列表</title>
<script type="text/javascript">
function batchchangData()
{
	var html="";
	 var str = selectallpro();
	  if (str != false) {
		$.post("/shopgoods/ajaxbutton", {"op": "getonegoods","id":str},
		  function(data){ 
				$("#endorderlistst").html(data);
				$('#endorderform').modal('show');	
			
		   },"text");
	 }
			
}
function AWSsubmitst(f,t)
{
	$('#'+t).modal('hide');
	AWS.ajax_post($('#'+f));
}
</script>
<body class="withvernav">
<div class="bodywrapper">
	{{include file='/public/leftmenu.tpl'}}
	<div class="centercontent tables">
		<div class="pageheader notab">
			<h1 class="pagetitle">店铺商品列表</h1>
			<span class="pagedesc"></span>
		</div>
		<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
    <div id="basicform" class="subcontent"> 
      <!--搜索栏-->
     <div style="float:left">
     <div style="padding:3px">
        <a href="javascript:void(0)" onClick="batchchangData()" class="stdbtn btn_red"><span>修改售价和库存</span></a>
        </div>
      </div>
      <div style="clear: both"></div>
      <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    </div>
    </div>
		<div id="contentwrapper" class="contentwrapper">
			<!--搜索栏-->
			<form class="stdform stdform2" method="get" action="/shopgoods/showGoodsList">
				<div class="tableoptions">
					<select name="shopID" id="shopname"  class="selection select2_group" style="width:150px;" >
						<option value="" >店铺</option>
						{{foreach from=$d_shop item=li key=key}}
						<option value="{{$li.id}}" {{if $shopID==$li.id}} selected{{/if}}>{{$li.name}}</option>
						{{/foreach}}
					</select>
					商品编号: <input type="text" name="other" id="other" class="width200" placeholder="SKU、ASIN、SaleSKU" value="{{$other}}" />
					库存数: <input type="text" name="stockbegin" class="width100" placeholder="请输入库存数" value="{{$stockbegin}}" />
					- <input type="text" name="stockend" class="width100" placeholder="请输入库存数" value="{{$stockend}}" />
					&nbsp;
					商品状态:
					<select name="types" id="types"  class="selection select2_group" style="width:150px;" >
						<option value="0" {{if $types==0}} selected{{/if}}>在售商品</option>
						<option value="1" {{if $types==1}} selected{{/if}}>下架商品</option>
						<option value="2" {{if $types==2}} selected{{/if}}>待审核</option>
						<option value="3" {{if $types==3}} selected{{/if}}>审核未通过</option>
					</select>
					<button class="btn btn_orange btn_search radius50">Search</button>
				</div>
			</form>
			<!--搜索栏结束-->

			<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
				<thead>
				<tr>
					<th class="head1" width="3%"><a onclick="allSelect('ppid[]')">全选</a></th>
					<th class="head0" width="12%">商品销售SKU</th>
					<th class="head1" width="7%">商品ASIN</th>
					<th class="head0" width="10%">商品SKU</th>
					<th class="head0" width="25%">商品名称</th>
					<th class="head1" width="6%">售价</th>
					<th class="head1" width="6%">售价(RMB)</th>
					<th class="head1"  width="6%">商品状态</th>
					<th class="head1"  width="3%">库存</th>
					<th class="head1" width="8%">所在店铺</th>
					<th class="head1"width="10%">发布时间</th>
					<th class="head1">操作</th>
				</tr>
				</thead>
				<tbody>
				{{foreach from=$list item=li key=key}}
				<tr>
					<td><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.id}}"></td>
					<td>{{$li.sales_sku}}</td>
					<td>{{$li.product_id}}</td>
                    
					<td><a href="/product/productlist?other={{$li.goods_sku}}" target="_blank">{{$li.goods_sku}}</a></td>
					<td style="width: 150px; overflow:hidden;white-space:nowrap; text-overflow:ellipsis;">{{$li.goods_name}}</td>
					<td>{{$li.original_price}} {{$li.moneytype}}</td>
					<td>{{$li.price}}</td>
					<td>
						{{if $li.types eq 0}}
							在售商品
						{{elseif $li.types eq 1}}
							下架商品
						{{elseif $li.types eq 2}}
							待审核
						{{elseif $li.types eq 3}}
							审核未通过
						{{/if}}
					</td>
					<td>{{$li.qty}}</td>
					<td>{{$li.shopname}}</td>
					<td>{{$li.sales_time}}</td>
					<td>
						<a href="{{$li.product_link}}" target="_blank">查看</a>
					</td>
				</tr>
				{{/foreach}}
				</tbody>

			</table>
			<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
			<br />
			<br />
		</div>
	</div>
<!-- 模态框（Modal）批量标完成 -->
<form action="/shopgoods/saveupdate"  method="post" name="batchendorderST" id="batchendorderST">
  <div class="modal fade" id="endorderform" tabindex="-1" role="dialog" aria-labelledby="sendorderform" aria-hidden="true">
    <div class="modal-dialog" style="width:65%;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sendorderform"> 待处理商品  </h4>
        </div>
        <div class="modal-body">
          <span id="errshowsku"></span>
           <div style="width:100%;height:400px; overflow-y:scroll; border:0px solid;">
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable" >
      <thead>
        <tr class="lbbt">
          <td  bgcolor="#FEFFF1" style="width:100px">店名</td>
          <td bgcolor="#FEFFF1" >销售SKU</td>
           <td  bgcolor="#FEFFF1"  style="width:100px">原始售价</td>
          <td  bgcolor="#FEFFF1">修改价格</td>
          <td  bgcolor="#FEFFF1"  >当前库存</td>
        
         
        </tr>
      </thead>
      
      <tbody id="endorderlistst">
          
         
      </tbody>
      
          </table>
           </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmitst('batchendorderST','endorderform')"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
  </form>

</body>
</html>